import Vue from 'vue';
import VueI18n from 'vue-i18n';
import { JsCookies } from './js-cookie';

Vue.use(VueI18n);

export const i18n = new VueI18n({
    locale: JsCookies.getCookie('locale') || 'zh_CN',
    messages: {
        'zh_CN': require('@/assets/languages/zh_CN.json'),
        'en_US': require('@/assets/languages/en_US.json')
    },
    silentTranslationWarn: true
});

export default i18n;
